package old.ships;

public abstract class Executor {

	protected String hostType;  //type of containing object
	protected CombatObject host;  //reference to containing object
	
	public Executor(CombatObjectEnum type, CombatObject object)
	{
		hostType = type.toString();
		host = object;
	}
		
	//handles all actions from received messages
	public void go()
	{
		String message;
		CombatObject content;
		
		//acquire current message
		message = host.communicator.getMessage();
		//check message validity before execution
		if (this.isValid(message))
		{
			//grab content of message
			content = host.communicator.getContent();  
			
			
		}
		
		
		
		
		
	}
	
	protected boolean isValid(String message)
	{
		return ObjectMessageCheck.validMessage(hostType, message);
	}
	
}
